package com.hxzy.controller;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author zl
 * @create 2020-10-30 11:58
 */
@ControllerAdvice
public class MyExceptionHandle {
    @ExceptionHandler
    public String handleException(Exception e){
        System.out.println(e.getMessage());
        return "exception";
    }
}
